package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 86155
 * date: 2024-03-24
 * Time: 19:48
 *
 * @author
 */

class B{
    public B(){
        func();
    }
    public void func(){
        System.out.println("B.func()");
    }
}
class D extends B{
    private int num = 1;
    @Override
    public void func() {
        System.out.println("D.func()"+num);
    }
}
public class Test2 {
    public static void main(String[] args) {
        D d =new D();
    }
}
